package com.xkdx.caipiao.my;

import java.util.HashMap;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

import com.xkdx.caipiao.R;
import com.xkdx.caipiao.ThreadActivity;
import com.xkdx.caipiao.module.network.AbsModule;
import com.xkdx.caipiao.presistence.login.Login;
import com.xkdx.guangguang.LoginActivity;

public class MyDetailActivity extends ThreadActivity {
	private LinearLayout ll_reddetail,ll_phone_detail,ll_flow_detail;
//	public static LoginInfo loginInfo;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_detail_caipiao);
		init();
	}

	private void init() {
		ll_reddetail = (LinearLayout) findViewById(R.id.ll_reddetail);
		ll_phone_detail = (LinearLayout) findViewById(R.id.ll_phone_detail);
		ll_flow_detail = (LinearLayout) findViewById(R.id.ll_flow_detail);
		ll_flow_detail.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
//				loginInfo = getLoginInfo();
				if (!(TextUtils.isEmpty(usrSP.getLogintoken()))) {
					Intent intent = new Intent(MyDetailActivity.this, MyFlowActivity.class);
					startActivity(intent);
				} else {
					Intent inten3 = new Intent(MyDetailActivity.this, LoginActivity.class);
					startActivity(inten3);
				}
				
			}
		});
		ll_phone_detail.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
//				loginInfo = getLoginInfo();
				if (usrSP != null
						&& !(TextUtils.isEmpty(usrSP.getLogintoken()))) {
					Intent intent = new Intent(MyDetailActivity.this, PhoneDetailActivity.class);
					startActivity(intent);
				} else {
					Intent inten3 = new Intent(MyDetailActivity.this, Login.class);
					startActivity(inten3);
				}
				
			}
		});
		ll_reddetail.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				Intent inten = new Intent(MyDetailActivity.this, LotteryDetailActivity.class);
				startActivity(inten);
				
			}
		});
		
	}

	@Override
	public void showOnPost(HashMap<String, AbsModule> result) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void startThread() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onBackClick(View view) {
		finish();
	}
}
